package com.test.ws.s1.service.imp;

import com.test.ws.s1.bean.Order;
import com.test.ws.s1.mapper.OrderDao;
import com.test.ws.s1.service.OrderService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class OrderServiceImp implements OrderService {
    @Autowired
    private OrderDao orderDao;

    @Override
    public List<Order> selectOrder(Order order , int id) {
        return orderDao.selectOrder(order,id);
    }

    @Override
    public List<Order> selectOrderAll(@Param("order") Order order) {
        return orderDao.selectOrderAll(order);
    }

    @Override
    public int insertOrder(Order order) {
        return orderDao.insertOrder(order);
    }

    @Override
    public int deleteOrder(Order order) {
        return orderDao.deleteOrder(order);
    }


}
